<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="huoyun" uri="/huoyun"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>发布车源信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
	
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/calendar/WdatePicker.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/additional-methods.js"></script>
<!--  
<script type="text/javascript" src="${pageContext.request.contextPath}/car/js/register-car-tzh.js"></script>
-->
	<script type="text/javascript">
		$(document).ready(function(){
			var valid = $("#edit_driver_form").validate({
				errorPlacement: function(error, element) {
					    // element.parent("td").append(error);
					     element.attr("title", error.html());
					   },
				rules : {
					"driver.name" : {
						required : true
					},
					"driver.province" : {
						required : true,
						isValid : true
					},
					"driver.city" : {
						required : true,
						isValid : true
					},
					"driver.town" : {
						required : true,
						isValid : true
					},
					"driver.mobilePhone":{
						mobile: true
					},
					"driver.idCardNumber" : {
						required : true,
						identityCard : true
					},
					"driver.drivingLicenseCarType" : {
						required : true
					},
					"driver.drivingLicenseNumber" : {
						required : true
					},
					"driver.drivingLicenseEffectivePeriod":{
						number:true
					}
				},
				messages : {
					"driver.name" : {
						required : "请输入姓名"
					},
					"driver.province" : {
						required : "请选择省",
						isValid : true
					},
					"driver.city" : {
						required : "请选择市",
						isValid : true
					},
					"driver.town" : {
						required : "请选择区（县）",
						isValid : true
					},
					"driver.mobilePhone":{
						mobile: "请输入正确的电话号码"
					},
					"driver.idCardNumber" : {
						required : "请填写身份证",
						identityCard : "请填写有效的身份证"
					},
					"driver.drivingLicenseCarType" : {
						required : "请填写准驾车型"
					},
					"driver.drivingLicenseNumber" : {
						required : "请填写驾驶证编号"
					},
					"driver.drivingLicenseEffectivePeriod":{
						number: "请以数字的形式填写有效期限"
					}
				}
			})
		});		
	</script>

</head>

<body>
	<div>
		<jsp:include page="../userAdmin/nav.jsp">
			<jsp:param value="nav_main" name="nav" />
		</jsp:include>
	</div>
	<div class="realCer">
		<!--主体部分-->
		<div class="realMain clearfix mt10">
			<!--左侧菜单-->
			<div class="realLeft" id="meunLeft">
				<jsp:include page="../userAdmin/leftMenu.jsp">
					<jsp:param value="con_nav_main" name="con_nav" />
				</jsp:include>
			</div>
			<!--中间-->
			<div class="realRight ml10">
				<!--中间-->
				<div class="realR_left">
					<div class="box">
						<div class="tit">
							<strong>修改司机信息</strong>
						</div>
						<div class="con">
							<div style="color: red; margin-left: 100px;">
								<s:property value="resultMsg" />
								<s:fielderror></s:fielderror>
							</div>
							<div id="car_driver_info_div" class="form_wrap clearfix"  style="min-width:400px; max-height:500px;">
								<form id="edit_driver_form" name="edit_driver_form" method="post" action="${pageContext.request.contextPath}/car/updateDriver.action?driverId=<%=request.getParameter("driverId")%>" namespace="/car">
								<table class="tableForm registerCar">
									<tbody>
										<!-- 司机个人基本信息 -->
										<tr>
											<td colspan="2" >
												<h2>司机个人基本信息</h2>
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="120">
												<span class="required-field">*</span>姓名:
											</td>
											<td class="tdValue">
												<s:textfield name="driver.name" id="driver.name"
												class="inputtext" theme="simple"/>
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												性别:
											</td>
											<td class="tdValue">
												<s:radio theme="simple" name="driver.gender" list="#{'0':'男','1':'女'}"></s:radio>
												<%-- <label for="male"><input type="radio"
												name="driver.gender" id="male" value="0" />男</label> <label
												for="female"><input type="radio"
												name="driver.gender" id="female" value="1" />女</label> <span
												id="gender_error_span" class="box-error"><b
												id="gender_error_span_i"></b> </span> --%>
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												民族:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.nation" id="driver.nation"
												class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												生日:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.birthDateStr"
												id="driver.birthDate" class="Wdate" onClick="WdatePicker()" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												<span class="required-field">*</span>住址:
											</td>
											<td class="tdValue">
												<!-- <input type="text" name="driver.address" id="driver.address"
												style="WIDTH:400px" class="inputtext" /> -->
												<huoyun:regionSelect provinceName="driver.province" cityName="driver.city" townName="driver.town" provinceValue="${driver.province }" cityValue="${driver.city }" townValue="${driver.town }" />
											</td>
										</tr>
										
										<tr>
											<td class="tdLabel" width="100">
												<span class="required-field">*</span>手机号码:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.mobilePhone" id="driver.mobilePhone"
												class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												<span class="required-field">*</span>身份证号码:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.idCardNumber"
												id="driver.idCardNumber" class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												身份证签发机关:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.issuingAuthority"
												id="driver.issuingAuthority" class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="100">
												身份证失效日期:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.idCardEffectiveEndDate"
												id="driver.idCardEffectiveEndDate" class="Wdate"
												onClick="WdatePicker()" />
											</td>
										</tr>
										<tr>
											<td colspan="2" >
												<h2>司机准驾信息</h2>
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="120">
												<span class="required-field">*</span>驾驶证准驾车型:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.drivingLicenseCarType"
												id="driver.drivingLicenseCarType" class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="120">
												<span class="required-field">*</span>驾驶证档案编号:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple" name="driver.drivingLicenseNumber"
												id="driver.drivingLicenseNumber" class="inputtext" />
											</td>
										</tr>
										<!-- <tr>
											<td class="tdLabel" width="120">
												地址(驾驶证):
											</td>
											<td class="tdValue">
												<input type="text" name="driver.drivingLicenseAddress"
												id="driver.drivingLicenseAddress" style="WIDTH:400px"
												class="inputtext" />
											</td>
										</tr> -->
										<tr>
											<td class="tdLabel" width="120">
												驾驶证发放日期:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple"
												name="driver.drivingLicenseEffectiveStartDate"
												id="driver.drivingLicenseEffectiveStartDate" class="Wdate"
												onClick="WdatePicker()" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="120">
												驾驶证年限:
											</td>
											<td class="tdValue">
												<s:textfield theme="simple"
												name="driver.drivingLicenseEffectivePeriod"
												id="driver.drivingLicenseEffectivePeriod" class="inputtext" />
											</td>
										</tr>
										<tr>
											<td class="tdLabel" width="120">
											</td>
											<td class="tdValue">
												<!-- <input type="submit" class="default_btn" value="修改" />
												<input type="button" class="default_btn" value="删除" onclick="if(confirm('确定要删除司机吗？')){this.form.action='/huoyun/car/deleteDriver.action?driverId=<%=request.getParameter("driverId")%>'; this.form.submit();}"/>
												 -->
												<div class="button button-mblue">
													<input type="submit" value="修 改" class="button-text">
												</div>	
												<div class="button button-mblue">
													<input type="button" value="删 除" id="ee" class="button-text" onclick="if(confirm('确定要删除司机吗？')){this.form.action='/huoyun/car/deleteDriver.action?driverId=<%=request.getParameter("driverId")%>'; this.form.submit();}">
												</div>											
											</td>
										</tr>
									</tbody>
									</table>
								</form>
								</div>
								<!-- 司机准驾信息结束 -->
						</div>
					</div>
				</div>
				<!-- 中间 -->
				<!--右侧-->
				<div class="realR_right">
					<div class="box mb10">
						<div class="tit">雇主说</div>
						<div class="con">44444444444444</div>
					</div>
				</div>
				<!--右侧-->
			</div>
			<!--中由-->
		</div>
	</div>
	<div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>
